package org.chen.ly.service;

import com.baomidou.mybatisplus.extension.service.IService;
import org.chen.common.lytrip.crawler.CrawlerExecutionResult;
import org.chen.common.lytrip.crawler.CrawlerTask;

import java.time.LocalDateTime;
import java.util.List;

public interface CrawlerTaskService extends IService<CrawlerTask> {
    List<CrawlerTask> getActiveTasks();

    void stopAllActiveTasks();

    CrawlerExecutionResult executeTaskWithResult(Long id); // 新增方法

    LocalDateTime calculateNextRunTime(String cronExpression); // 新增方法

    void updateStatus(Long id, int status);
}